#===================
# Author: Huang Gang
# Date: 2017-09-19
#===================
# -*- coding: utf-8 -*-
import time
import random

#import requests

'''
def md5(pwd):
    import hashlib
    m = hashlib.md5()
    m.update(pwd)
    return m.hexdigest()
'''
class generate_vcode:
    create_verifycode(session)

def create_verifycode(session):
    chars=['0','1','2','3','4','5','6','7','8','9']
    x = random.choice(chars),random.choice(chars),random.choice(chars),random.choice(chars),random.choice(chars),random.choice(chars)
    verifyCode = "".join(x)
    session["phoneVerifyCode"] = {"time":int(time.time()), "code":verifyCode}
    return verifyCode

